package day07;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collector;
import java.util.stream.Collectors;

public class homework06 {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        Collections.addAll(list, 1, 1, 2, 22, 2, 3, 4, 4, 3, 5);
        List<Integer> list1=distinct(list);
        System.out.println(list1);
    }

    private static List distinct(ArrayList<Integer> list) {
        List<Integer> list1 = list.stream().distinct().collect(Collectors.toList());
        return list1;
    }
}
